package com.jxm.controller;

import com.jfinal.aop.Inject;
import com.jfinal.core.Controller;
import com.jfinal.core.paragetter.Para;
import com.jxm.service.UserService;
import com.jxm.vo.IResult;

public class LoginController extends Controller{
	
	@Inject
	private UserService userService;
	
	/**
	 * 默认调用方法
	 */
	public void index() {
		renderJsp("login.jsp");
	}
	
	/**
	 * 登录
	 */
	public void loginInto(@Para("username") String username,@Para("password") String password){
		IResult result = userService.login(username);
		renderJson(result);
	}
	
}
